// FILE: IconExt.h
//
// InstallAware APPX Library for Microsoft's Desktop Bridge
// Copyright(C) 2016 InstallAware Software
//
// This program is free software : you can redistribute it and / or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.If not, see <http://www.gnu.org/licenses/>.
// 
// Contact InstallAware Software at support@installaware.com.

//	REVISION HISTORY
//
//	  2016-DEC-08 - Version 1.0.2.301 - First Open Source release.
//					
//					
//	

#pragma once

#include <gdiplus.h>
using namespace Gdiplus;

class CIconExt
{
public:
	CIconExt();
	~CIconExt();

	void Free();

	bool Load(LPCWSTR lpwPath, int index, int nWidth, int nHeight);
	static HICON GetExtraLargeIcon(LPCWSTR lpwPath, int index);

	bool CIconExt::SaveAsPng(LPCWSTR lpwFile);

protected:
	Gdiplus::Bitmap* m_bmp;
	ULONG_PTR m_gdiplusToken;
};

